<?php

namespace App\Models\V1;

use Illuminate\Database\Eloquent\Model;
use App\Scopes\V1\ValidDataScope;

class NewStudent extends Model
{
    //
    protected $table = 'basic_new_students';

    /**
     * 模型启动函数
     */
    protected static function boot()
    {
        parent::boot();
        static::addGlobalScope(new ValidDataScope);
    }

    /**
     * 可被批量赋值字段（白名单）
     *
     * @var array
     */
    protected $fillable = [
        'arrival_code','enrollment_numbering','exam_code','name','sex','avatar','mobile','address',
        'card_type','card_number','birthday','original_type','admission_property','employment_type','exam_province',
        'exam_area','graduated_school','school_type','enrollment_type','score','political_status',
        'height','weight','body_type','physical_fitness','psychological_quality','medical_history','blood_type','ill_remark',
        'enrollment_category','enrollment_code','enrollment_directory','major_directory_code',
        'academic_category','read_year','school_mode','ethnic','household',
        'support_type','pay_status','report_status','is_stay','class_code','dorm_code','textbook_status',
        'daily_use_status','key_status','custodian_title', 'custodian_name','custodian_mobile',
        'enrollment_teacher', 'remark','graduated_class','enroll_category','enroll_professional','parents_name',
        'is_stay','created_at','updated_at'
    ];

    /**
     * 限制数组或JSON输出时，隐藏字段
     *
     * @var array
     */
    protected $hidden = [
        'id','deleted_at',
    ];

}
